/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BUS;

import DAO.KhachHang_DAO;
import DTO.KhachHang_DTO;
import java.util.ArrayList;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Lenh Ho Xung
 */
public class KhachHang_BUS {

    public static ArrayList<KhachHang_DTO> layDSKhachHang() throws Exception {
        return KhachHang_DAO.layDSKhachHang();
    }

    public static String layTenKHTheoMa(String maKhach) throws Exception {
        return KhachHang_DAO.layTenKHTheoMa(maKhach);
    }

    public static String laySoDTTheoMa(String maKhach) throws Exception {
        return KhachHang_DAO.laySoDTTheoMa(maKhach);
    }

    public static void Insert(KhachHang_DTO k) throws Exception {
        KhachHang_DAO.Insert(k);
    }

    public static String laymaMax() throws Exception {
        return KhachHang_DAO.laymaMax();
    }
    public static DefaultTableModel laykhachDatPhong(String cmnd) throws Exception{
        return KhachHang_DAO.layKhachDatPhong(cmnd);
    }
    public static void capNhatTinhTrangKhach(String maKhach, String ttcapNhat) throws Exception{
        KhachHang_DAO.capnhatTinhTrangKhachHang(maKhach, ttcapNhat);
    }

    public static ArrayList<KhachHang_DTO> layKhachDangThue() throws Exception{
        return KhachHang_DAO.layKhachDangThue();
    }
    public static  DefaultTableModel layDSKhach() throws Exception{
        return KhachHang_DAO.layDSKhach();
    }
    public static DefaultTableModel timKhachTheoTen(String tenKhach) throws Exception{
        return KhachHang_DAO.timKhachTheoTen(tenKhach);
    }
    public static DefaultTableModel timKhachTheoCMND(String cmnd) throws Exception{
        return KhachHang_DAO.timKhachTheoCMND(cmnd);
    }


}
